// for class based (OO) access to screen drawing functions

#pragma once
#include <windows.h>

#include "../../ScriptHook/ScriptingTypes.h"
#include "../../ScriptHook/Scripting.h"
#include "../ScriptingTypes.h"
#include "../Log.h"
#include "GTAForm.h"
//#include "../KeyboardHook.h"
#include "../Events.h"

using namespace System::Windows::Forms;
using namespace GTA::Events;

namespace GTA
{
	public ref class Screen
	{
	private:
	protected:
	public:
		Screen::Screen();
		static void RunTick(Object^ sender, EventArgs^ args);
		static void CleanUp(Object^ sender, GTA::Events::CleanUpEventArgs^ args);

		static void DrawForms();
		static void DrawForm(GTAForm ^form);
		static void DrawFormControl(Control ^parent, Control ^ctrl);
		static void AddForm(GTAForm^ form);
		static void RemoveForm(GTAForm^ form);
		static GTAForm ^GetFormFromScreenXY(float x, float y);
		static Control ^GetControlFromScreenXY(GTAForm ^form, float x, float y);

		static void DrawMouse();
		static void CheckMouseClick(short KeyCode);
		static void OnKeyUp(System::Object^ sender, GTA::Events::KeyEventArgs^ args);


		//static float Screen::ConvertPixelToFloat(u32 pix);
		static void PrintString(String^ text,u32 timeMS);
		static System::Collections::Generic::List<GTAForm^>^ Forms; // = gcnew System::Collections::Generic::List<GTAForm^>();

	};
};